﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Forging2
{
    public class G_Variable:DependencyObject
    {
        public static DependencyProperty TestProperty;
        public static DependencyProperty MenuHeightProperty;

        
        static G_Variable()
        {
            TestProperty = DependencyProperty.Register("Test", typeof(string), typeof(G_Variable), new PropertyMetadata("测试2", OnValueChanged));
            MenuHeightProperty = DependencyProperty.Register("MenuHeight", typeof(string), typeof(G_Variable), new PropertyMetadata("菜单高度", OnValueChanged));
        }

        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ////throw new NotImplementedException();
        }

        public string Test
        {
            get { return (string )GetValue(TestProperty); }
            set { SetValue(TestProperty, value); }
        }
        /// <summary>
        /// 菜单栏高度
        /// </summary>
        public string  MenuHeight
        {
            get { return GetValue(MenuHeightProperty).ToString (); }
            set { SetValue(MenuHeightProperty, value); }
        }
    }


    /*
    private void InFurnace_MouseDoubleClick(object sender, MouseButtonEventArgs e)
    {
        frontData.Notification = "连接成功！";
        System.Threading.Thread thread;
        thread = new System.Threading.Thread(() =>
        {
            //Notification.Text = frontData.Notification;
            //frontData.Notification = "连接成功！";
            App.Current.Dispatcher.Invoke(new Action(() =>
            {
                Notification.Text = frontData.Notification;
            }));

        });
        thread.Start();
        Console.WriteLine(frontData.Notification);
    }*/
}
